import torch
import numpy as np

# list1 = [
#     [1, 2, 3, 4, 5],
#     [6, 7, 8, 9, 10],
#     [11, 12, 13, 14, 15]
# ]
# print(list1)
# array = np.array(list1)
# print(array)
#
# tensor1 = torch.tensor(list1)
# print(tensor1)

x = torch.tensor(3.0)
x.requires_grad_()
y = x ** 2
y.backward()
print(y)
print(x.grad)
